package org.yzh.scheduler.model.enums;

import org.yzh.commons.model.enums.ResultCode;

/**
 * Created by Alan.ye on 2017/5/20.
 */
public enum ResultCodes implements ResultCode {

    Success(1, "成功"),
    TypeMismatch(400, "参数格式不正确"),
    MissingParameter(401, "缺少必要的参数"),
    NotSupportedType(402, "不支持的请求类型"),
    NotImplemented(404, "未实现的方法"),

    NotFoundUser(405, "找不到用户"),
    UsernameOrPasswordError(406, "用户名或密码错误"),


    OperationFailed(403, "操作失败");

    public final Integer code;

    public final String message;

    ResultCodes(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}